#define _CRT_SECURE_NO_WARNINGS 1

#include<stdio.h>
#include<string.h>

int chnum(char *p)
{
	int num = 0, k, j, len;
	len = strlen(p);
	for (; *p != '\0'; p++)
	{
		k = *p - '0';
		j = (--len);
		while (j-- > 0)
		{
			k = k * 10;
		}
		num = num + k;
	}
	return num;
}


int main()
{
	char s[6];
	int n;
	gets(s);
	if (*s == '-')n == -chnum(s + 1);
	else
		n = chnum(s);
	printf("%d", n);
	return 0;
}